package com.etool.commons.sql;

/**
 * @description sql��������
 * ����
 * select * from user where username="linjia" 
 * new SearchCondition("username","linjia")
 * 
 * select * from user where birthday>'1988-8-7 07:07:07' and brithday <'2009-9-9 9:9:9'
 * new SearchCondition("birthday1","birthday","1988-8-7 07:07:07",">");
 * new SearchCondition("birthday2","birthday","2009-9-9 9:9:9","<");
 * @author linjia
 *
 */
public class SearchCondition {
	

	private String alias;
	private String key;
	private Object value;
	private String operator;
	

	public SearchCondition(String key, Object value) {
		super();
		this.alias=key;
		this.key = key;
		this.value = value;
		operator="=";
	}
	
	public SearchCondition(String alias, String key, Object value) {
		super();
		this.alias = alias;
		this.key = key;
		this.value = value;
		operator="=";
	}
	
	public SearchCondition(String alias, String key, Object value,
			String operator) {
		super();
		this.alias = alias;
		this.key = key;
		this.value = value;
		this.operator = operator;
	}

	public String getKey() {
		return key;
	}

	public Object getValue() {
		return value;
	}
	
	public String getAlias() {
		return alias;
	}
	public String getOperator() {
		return operator;
	}


}
